package gui.edit.utils;

import gui.edit.enums.E_EditParamsSliders;

import java.awt.Color;
import java.util.Hashtable;

import javax.swing.JLabel;

import data.Constants;
import data.visu.utils.StringFormater;

/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class QualitativeSliders {

	
	public static Hashtable<Integer, JLabel> getLabelTable(E_EditParamsSliders editParam){
		Hashtable<Integer, JLabel> labelTable = new Hashtable<Integer, JLabel>();
		
		if(editParam.equals(E_EditParamsSliders.SHOT_TYPE)){
			String stringExtremeCloseUp = Constants.BAND_CAMERA_DISTANCE_TO_ACTORS_EXTREME_CLOSE_UP.getString();
	        stringExtremeCloseUp = StringFormater.formatString(stringExtremeCloseUp, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelExtremeCloseUp = new JLabel(stringExtremeCloseUp);
	        labelExtremeCloseUp.setForeground(Color.RED);
	        labelExtremeCloseUp.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 0 ), labelExtremeCloseUp );
	        
	        String stringCloseUp = Constants.BAND_CAMERA_DISTANCE_TO_ACTORS_CLOSE_UP.getString();
	        stringCloseUp = StringFormater.formatString(stringCloseUp, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelCloseUp = new JLabel(stringCloseUp);
	        labelCloseUp.setForeground(new Color(255,0,122));
	        labelCloseUp.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 1 ), labelCloseUp );
	        
	        String stringMediumShot = Constants.BAND_CAMERA_DISTANCE_TO_ACTORS_MEDIUM_SHOT.getString();
	        stringMediumShot = StringFormater.formatString(stringMediumShot, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelMediumShot = new JLabel(stringMediumShot);
	        labelMediumShot.setForeground(new Color(255,0,255));
	        labelMediumShot.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 2 ), labelMediumShot);
	        
	        String stringLongShot = Constants.BAND_CAMERA_DISTANCE_TO_ACTORS_LONG_SHOT.getString();
	        stringLongShot = StringFormater.formatString(stringLongShot, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelLongShot = new JLabel(stringLongShot);
	        labelLongShot.setForeground(new Color(122,0,255));
	        labelLongShot.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 3 ), labelLongShot);
	        
	        String stringExtremeLongShot = Constants.BAND_CAMERA_DISTANCE_TO_ACTORS_EXTREME_LONG_SHOT.getString();
	        stringExtremeLongShot = StringFormater.formatString(stringExtremeLongShot, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelExtremeLongShot = new JLabel(stringExtremeLongShot);
	        labelExtremeLongShot.setForeground(Color.BLUE);
	        labelExtremeLongShot.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 4 ), labelExtremeLongShot);
		}
		else if(editParam.equals(E_EditParamsSliders.DYNAMICITY)){
	        String stringNone = Constants.BAND_CAMERA_DYNAMICITY_NONE.getString();
	        stringNone = StringFormater.formatString(stringNone, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelNone = new JLabel(stringNone);
	        labelNone.setForeground(Color.RED);
	        labelNone.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 3 ), labelNone );
	        
	        String stringOrientation = Constants.BAND_CAMERA_DYNAMICITY_ORIENTATION.getString();
	        stringOrientation = StringFormater.formatString(stringOrientation, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelOrientation = new JLabel(stringOrientation);
	        labelOrientation.setForeground(new Color(255,0,170));
	        labelOrientation.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 2 ), labelOrientation );
	        
	        String stringPositionAndOrientation = Constants.BAND_CAMERA_DYNAMICITY_POSITION_AND_ORIENTATION.getString();
	        stringPositionAndOrientation = StringFormater.formatString(stringPositionAndOrientation, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelPositionAndOrientation = new JLabel(stringPositionAndOrientation);
	        labelPositionAndOrientation.setForeground(new Color(170,0,255));
	        labelPositionAndOrientation.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 1 ), labelPositionAndOrientation);
	        
	        String stringFull = Constants.BAND_CAMERA_DYNAMICITY_FULL.getString();
	        stringFull = StringFormater.formatString(stringFull, Constants.CAMERA_PANEL_NB_LETTERS_FOR_SLIDERS_LABEL_TABLE);
	        JLabel labelFull = new JLabel(stringFull);
	        labelFull.setForeground(Color.BLUE);
	        labelFull.setFont(Constants.CAMERA_PANEL_FONT_SLIDERS_LABEL_TABLE);
	        labelTable.put(new Integer( 0 ), labelFull);
		}
		
		return labelTable;
		
	}
}
